package com.lsa.the6046j.ps1;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.PrintStream;

import junit.framework.TestCase;

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.output.ByteArrayOutputStream;

public class Test_Unimodal extends TestCase {
	public void test() throws FileNotFoundException, IOException {
		ByteArrayOutputStream out = new ByteArrayOutputStream();
        Unimodal.process(new FileInputStream("data/the6046j.ps1/unimodal.inp"), new PrintStream(out));
        String expected = FileUtils.readFileToString(new File("data/the6046j.ps1/unimodal.out"));
        assertEquals(expected, out.toString());
	}
}
